var pkid;

$(function() {
	$("#Button2").bind("click", function() {
				document.location = context + "/site/focalCompany/8.jsp";
			});

	var id = getParameter("8-1.js", "id");
	pkid = getParameter("8-1.js", "pkid");

	new $.grooveViewPreII({
				id : id,
				primaryTable : "fcindent",
				foreignTables : [{
							foreignTable : "fcindentlist",
							listid : "fcorderlist"
						}]
			}, "viewfcorder", {
				formID : "formID",
				beforecall : function() {

				},
				aftercall : function() {

				},
				rendercall : function(selfFunc, validator, validators, data,
						dataBean) {
					if (dataBean.ID_PAYSTATUS) {
						$("#Button2")
								.before("<input type=\"button\" value=\"订单支付查阅\" id=\"Button3\" class=\"l-button l-button-submit\" style=\"margin-left:7px;width:100px;\"/>");
					}
				}
			});

	$("#pageloading").hide();
});